package com.njegovanobradovic.so.impl;

import org.apache.tapestry5.ioc.annotations.Inject;

import com.njegovanobradovic.core.dao.HibernateDAO;
import com.njegovanobradovic.entities.Page;
import com.njegovanobradovic.so.GetHomePage;

public class GetHomePageImpl implements GetHomePage{
	@Inject
	private HibernateDAO dao;

	public Page execute() {
		try {
			return dao.getByIntValue(Page.class, "orderNum", 1);
		} catch (Exception e) {
			return null;
		}
	}

}
